package com.jbm.jbmsupplier.util;

import java.io.Serializable;
import java.sql.Timestamp;

/**
 * Created by lyh on 2017-02-22.
 */

public class PraiseEntity extends com.jbm.jbmsupplier.util.ICtrl implements Serializable {

    private static final long serialVersionUID = 84480750465953443L;
    private int praiseId;
    private Integer mainId;
    private Integer loginId;
    private Integer praiseType;
    private Timestamp createDate;

    public      PraiseEntity(){}
    public      PraiseEntity(String method,int mainid,int loginid,int praiseType){
        this.method=method;
        this.mainId=mainid;
        this.loginId=loginid;
        this.praiseType=praiseType ;
    }

    public int getPraiseId() {
        return praiseId;
    }

    public void setPraiseId(int praiseId) {
        this.praiseId = praiseId;
    }


    public Integer getMainId() {
        return mainId;
    }

    public void setMainId(Integer mainId) {
        this.mainId = mainId;
    }


    public Integer getLoginId() {
        return loginId;
    }

    public void setLoginId(Integer loginId) {
        this.loginId = loginId;
    }


    public Integer getPraiseType() {
        return praiseType;
    }

    public void setPraiseType(Integer praiseType) {
        this.praiseType = praiseType;
    }


    public Timestamp getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Timestamp createDate) {
        this.createDate = createDate;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        PraiseEntity that = (PraiseEntity) o;

        if (praiseId != that.praiseId) return false;
        if (createDate != null ? !createDate.equals(that.createDate) : that.createDate != null) return false;
        if (loginId != null ? !loginId.equals(that.loginId) : that.loginId != null) return false;
        if (mainId != null ? !mainId.equals(that.mainId) : that.mainId != null) return false;
        if (praiseType != null ? !praiseType.equals(that.praiseType) : that.praiseType != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = praiseId;
        result = 31 * result + (mainId != null ? mainId.hashCode() : 0);
        result = 31 * result + (loginId != null ? loginId.hashCode() : 0);
        result = 31 * result + (praiseType != null ? praiseType.hashCode() : 0);
        result = 31 * result + (createDate != null ? createDate.hashCode() : 0);
        return result;
    }
}
